package com.xiaoke.service.impl;

import com.xiaoke.entity.Coupon;
import com.xiaoke.mapper.CouponMapper;
import com.xiaoke.service.CouponService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class CouponServiceImpl implements CouponService {
    @Autowired
    private CouponMapper couponMapper;

    @Override
    public List<Coupon> findByUserAndShop(String userId, String shopId) {
        return couponMapper.findByUserAndShop(userId,shopId);
    }

    @Override
    public Integer countByUserAndShop(String userId, String shopId) {
        return couponMapper.countByUserAndShop(userId,shopId);
    }

    @Override
    public Coupon selectByPrimaryKey(String couponId) {
        return couponMapper.selectByPrimaryKey(couponId);
    }
}
